package com.huaxin.device.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.Data;

@Data
public class EquipmentCategoryCreateReqDTO {

    @Schema(description = "分类编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "TRANSFORMER")
    @NotBlank(message = "分类编码不能为空")
    private String categoryCode;

    @Schema(description = "分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "干式变压器")
    @NotBlank(message = "分类名称不能为空")
    private String categoryName;

    @Schema(description = "父级分类ID", example = "")
    private String parentId;

    @Schema(description = "层级：1-大类，2-子类，3-细类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "层级不能为空")
    @Positive(message = "层级必须大于0")
    private Integer level;

    @Schema(description = "图标URL或类名", example = "icon-transformer")
    private String icon;

    @Schema(description = "分类描述", example = "用于电力系统中的干式变压器")
    private String description;

    @Schema(description = "是否为叶子节点", example = "false")
    private Boolean isLeaf;

    @Schema(description = "排序号", example = "10")
    private Integer sortOrder;

    @Schema(description = "组织ID", example = "c123e456-789a-bcde-f012-3456789abcde")
    private String orgId;
}